<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/mytag.jspf"%>%>

<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<title>user</title>
<script type="text/javascript">
	$("#grid").jqGrid({
		pager:"#pager",
		url:"management/vip/page",
	   	colNames:["ID","会员卡号","姓名","性别","生日","手机号","积分","余额","身份证号","操作"],
	   	colModel:[
	   		{name:"vipId",width:100,hidden:true},
	   		{name:"vipNo", width:50},
	   		{name:"name",width:80},
	   		{name:"sex",width:20,formatter: "select", editoptions:{value:"M:男;F:女"}},
	   		{name:"birthday",width:100,formatter:"date", formatoptions: {newformat:'Y-m-d'}},
	   		{name:"phoneNo",width:50},
	   		{name:"points",width:50},
	   		{name:"balance",width:50},
	   		{name:"idNo",width:100},
	   		{name:"ctrl",width:50,formatter:function(cellvalue, options, rowObject){
	   			var btns = "<div class='am-btn-group am-btn-group-xs'>";
	   			btns+="<a href='management/vip/balanceEdit/"+rowObject.vipId+"' class='am-btn am-btn-default' title='充值'><span class='am-icon-edit'></span>充值</a>";
	   			btns+="</div>";
	   			return btns;
	   		}},
	   	]
	});
	$(function(){ 
	    $("#searchBtn").click(function(){
	        $("#grid").jqGrid('setGridParam',{ 
	            postData:$("#queryForm").serializeJson(), //发送数据
	            page:1
	        }).trigger("reloadGrid"); //重新载入 
	    }); 
	});
</script>
</head>

<body>
	<ol class="am-breadcrumb am-breadcrumb-slash am-padding" style="margin-bottom: 0px;">
		<li><a href="management/index">首页</a></li>
		<li class="am-active">会员余额管理</li>
	</ol>	
	<div class="am-g">
		<form id="queryForm">
		<div class="am-u-md-4">
			<div class="am-input-group am-input-group-sm">
				<input type="text" name="vipNo" class="am-form-field" placeholder="请输入会员号查询"><span class="am-input-group-btn"><button class="am-btn am-btn-default" type="button" id="searchBtn">搜索</button></span>
			</div>
		</div>
		</form>
	</div>
	<div class="am-g am-padding-vertical">
		<div class="am-u-md-12"><table id="grid"></table><div id="pager"></div></div>
	</div>
</body>
</html>
